<template>
	<view>
		<!-- 搜索建议列表 -->
		<view class="sugg-item" @click="gotoDetail(item.goods_id)">
			<view class="goods-name">{{item.goods_name}}</view>
			<view class="icon">
				<uni-icons type="arrowright" size="16"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		searchList
	} from '@/util/good_list.js'
	export default {
		name: "sousuo-list-item",
		props: {
			item: {
				type: Object
			}
		},
		data() {
			return {

			};
		},
		methods:{
			gotoDetail(goods_id) {
				uni.navigateTo({
					// 指定详情页面的 URL 地址，并传递 goods_id 参数
					url: '../../pages/details/details'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
		.sugg-item {
			width: 100%;
			display: flex;
			// justify-content: space-between;
			align-items: center;
			font-size: 26rpx;
			padding: 13rpx 0;

			.goods-name {
				flex: 1;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
				margin-right: 3px;
			}
			.icon{
				flex-shrink: 0;
			}

		}
</style>
